package admin_login_log

import (
	"gorm.io/gorm"
	"time"
)

//定义模型
type AdminLoginLog struct {
	ID 			uint 		`json:"id" gorm:"primaryKey"`
	AdminId		uint		`json:"admin_id"`
	IP			string		`json:"ip" gorm:"comment:'登录ip'"`
	CreateTime 	time.Time 	`json:"create_time"`
}

func (log *AdminLoginLog) BeforeCreate(*gorm.DB) (err error) {
	log.CreateTime = time.Now()
	return
}
